home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr25 / me310.zip / UE310C.ZIP / HISTORY.C < prev    next >
Text File  |  1989-03-18  |  60KB  |  1,275 lines

  1. /*
  2.  *    HISTORY.C:    Revision History for
  3.  *
  4.  *    MicroEMACS 3.10                
  5.  *        written by Daniel M. Lawrence
  6.  *        based on code by Dave G. Conroy.
  7.  *
  8.  *    (C)opyright 1988,1989 by Daniel M. Lawrence
  9.  *    MicroEMACS 3.10 can be copied and distributed freely for any
  10.  *    non-commercial purposes. MicroEMACS 3.10 can only be incorporated
  11.  *    into commercial software with the permission of the current author.
  12.  *
  13.  * REVISION HISTORY:
  14.  *
  15.  * 1.0    Steve Wilhite, 30-Nov-85
  16.  *    - Removed the old LK201 and VT100 logic. Added code to support the
  17.  *      DEC Rainbow keyboard (which is a LK201 layout) using the the Level
  18.  *      1 Console In ROM INT. See "rainbow.h" for the function key defs
  19.  *    Steve Wilhite, 1-Dec-85
  20.  *    - massive cleanup on code in display.c and search.c
  21.  *
  22.  * 2.0    George Jones, 12-Dec-85
  23.  *    - Ported to Amiga.
  24.  *
  25.  * 3.0    Daniel Lawrence, 29-Dec-85
  26.  *    - rebound keys/added new fast buffered I/O for AMIGA
  27.  *    - added META- repeat commands
  28.  *    - added reposition default to center screen (yeah!)
  29.  *    - changed exit with modified buffers message
  30.  *    - made filesave tell us what it is doing
  31.  *    - changed search string entry to terminate with <ESC>
  32.  *      so we can use <NL> in search/replace strings
  33.  *    - updated version number in mode line to 3.0
  34.  *    12-Jan-86
  35.  *    - Added code to reconize the search/replace functions
  36.  *    - Added code to perform search/replace & query functions
  37.  *    14-Jan-86
  38.  *    - moved search logic to separate function in search.c
  39.  *    - added replace and query replace functions
  40.  *    - separated out control key expansions to be used by others in search.c
  41.  *    15-Jan-86
  42.  *    - changed "visiting" to finding
  43.  *    - changed yes/no responses to not need return
  44.  *    - cleaned up various messages
  45.  *    16-jan-86
  46.  *    - fixed spurious spawn message in MSDOS
  47.  *    - added ^X-S synonym to save command
  48.  *    - moved escape to shell to ^X-C
  49.  *    21-jan-86
  50.  *    - added code to suspend shell under BSD
  51.  *    22-jan-86
  52.  *    - added function key support (SPEC) under MSDOS
  53.  *    - Abort now prints [Aborted] on message line
  54.  *    23-jan-86
  55.  *    - Added modes and commands to set/unset them
  56.  *    24-jan-86
  57.  *    - Added Goto Line command
  58.  *    - added Rename Buffer command
  59.  *    28-jan-86
  60.  *    - added goto beginning and end of paragraph commands (META-P/META-N)
  61.  *    - re-wrote kdelete to use realloc. Gained MUCH speed here when
  62.  *      doing large wipes on both UNIX and MSDOS. Changed kill buffer
  63.  *      allocation block size from 256 bytes to 1 k
  64.  *    29-jan-86
  65.  *    - moved extern function declarations to efunc.h
  66.  *    - made name[] name binding table
  67.  *    30-jan-86
  68.  *    - fixed Previous/Next paragraph command not to wrap around EOF
  69.  *    - added Fill Paragraph command (META-Q)
  70.  *    4-feb-86
  71.  *    - added code to properly display long lines, scrolling them right
  72.  *      to left
  73.  *    5-feb-85
  74.  *    - rewrote code to right/left scroll...much better
  75.  *    - added shifted arrow keys on IBMPC
  76.  *    6-feb-85
  77.  *    - add option to allow forward-word to jump to beginning of
  78.  *      next word instead of end of current one. This is different from
  79.  *      other emacs' but can be configured off in estruct.h
  80.  *    - added VIEW mode to allow a buffer to be read only
  81.  *       (-v switch on command line will activate this)
  82.  *    - changed quick exit to write out ALL changed buffers!!!
  83.  *      MAKE SURE YOU KNOW THIS WHEN META-Zing
  84.  *    10-feb-86
  85.  *    - added handling of lines longer than allowed on file read in
  86.  *      (they wrap on additional lines)
  87.  *    - made having space clear the message line and NOT insert itself
  88.  *      a configuration option in ed.h
  89.  *    11-feb-86
  90.  *    - added Describe-command and Help commands.
  91.  *    13-feb-86
  92.  *    - added View file command (^X ^V) and finished HELP command
  93.  *    14-feb-86
  94.  *    - added option to let main loop skip update if type ahead commands
  95.  *       are queued up
  96.  *    16-feb-86
  97.  *    - added Insert File command
  98.  *    17-feb-86
  99.  *    - added scroll next window up/down commands
  100.  *    18-feb-86
  101.  *    - added CMODE indentation
  102.  *    - re-arranged header files to standardize extern and global
  103.  *      definitions
  104.  *    - changed version number to 3.2
  105.  *    - added numeric arguments to search, reverse search and
  106.  *      search and replace
  107.  *    24-feb-86
  108.  *    - added Bind To Key function (^C for now) to allow the user
  109.  *      to change his command keys
  110.  *    - added Unbind key function (M-^C for now)
  111.  *    - added execute named command to execute unbound commands (M-X)
  112.  *    - added describe bindings command (not bound)
  113.  *    - changed version number to 3.3
  114.  *    25-feb-86
  115.  *    - scrapped CERROR mode (too many compilers)
  116.  *    - added EXACT mode for case sensitive searchers
  117.  *    26-feb-86
  118.  *    - added command completion on execute named command and
  119.  *      all routined grabbing a command name
  120.  *    - adding execute-command-line command and its support functions
  121.  *      (in preparation for sourcing files)
  122.  *    - added Execute Buffer command
  123.  *    27-feb-86
  124.  *    - added execute(source) file command and added code to automatically
  125.  *      execute emacs.rc (or .emacsrc on UNIX) before initial read in
  126.  *    - changed version number to 3.4
  127.  *    4-mar-86
  128.  *    - changed word delete to be consistant with word move (it gets
  129.  *      rid of the inter word space now) This is configurable with the
  130.  *      NFWORD symbol in estruct.h
  131.  *    - added B_ACTIVE entry to the buffer table. Let emacs read multiple
  132.  *      file names from the command line and only read them in as needed
  133.  *    5-mar-85
  134.  *    - rewrote command line parser to get rid of my patchy code
  135.  *    - changed version number to 3.5
  136.  *    1-apr-86
  137.  *    - added support for Aztec C 3.20e under MSDOS
  138.  *    - fixed bug in mlwrite on ADM3's and their ilk under V7
  139.  *    - added insertion of pounds in column one under CMODE
  140.  *    - changed version number to 3.6
  141.  *    3-apr-86
  142.  *    - added next-buffer command (^X-X)
  143.  *    5-apr-86
  144.  *    - added kill paragraph command (M-^W)
  145.  *    - changed fill-paragraph to leave 2 spaces after a period at the
  146.  *      end of a word.
  147.  *    - added OVERWRITE mode
  148.  *    7-apr-86
  149.  *    - fixed overwrite mode to handle tabs
  150.  *    8-apr-86
  151.  *    - added add/delete global mode (<ESC>M & <ESC> ^M) commands
  152.  *    9-apr-86
  153.  *    - added insert space command
  154.  *    - moved bindings around     ^C    insert space
  155.  *                    M-K    bind-to-key
  156.  *                    INSERT    insert space
  157.  *                    DELETE    forwdel
  158.  *    - added hunt forward and hunt reverse commands
  159.  *    10-apr-86
  160.  *    - fixed bug in DOBUF with non-terminated command string
  161.  *    15-apr-86
  162.  *    - fixed tab expansion bug in DISPLAY which hung the AMIGA
  163.  *      (sent in by Dawn Banks)
  164.  *    - fixed curcol problen if forwline/backline during keyboard
  165.  *      macro execution (sent in by Ernst Christen)
  166.  *    - added AMIGA function/cursor key support
  167.  *    - fixed nonterminating <NL> replacement bug
  168.  *    - fixed word wrapping problems
  169.  *    16-apr-86
  170.  *    - updated documentation and froze development for 3.6 net release
  171.  *    23-apr-86    version 3.6a
  172.  *    - added foreground and background colors. Setable with the
  173.  *      add mode commands for the moment
  174.  *    24-apr-86
  175.  *    - added command to pipe CLI output to a buffer
  176.  *    25-apr-86
  177.  *    - added Dana Hoggatt's code to replace Lattice's sick system()
  178.  *      function. Now we no longer care what the switchar is.
  179.  *    - cleaned up the positioning on several of the spawing commands
  180.  *    26-apr-86
  181.  *    - added an output flush in vttidy(). Unix really appreciates this.
  182.  *    - added filter-buffer (^X#) command to send a buffer through
  183.  *      a DOS filter
  184.  *    - made automatic CMODE on .c and .h file compilation dependant
  185.  *      in estruct.h
  186.  *    1-may-86
  187.  *    - optimized some code in update(). It certainly needs a lot more.
  188.  *    - added Aztec profiling capabilities. These are conditional on
  189.  *      the APROF symbol in estruct.h
  190.  *    2-may-86
  191.  *    - added (u)ndo command in query-replace. undoes last repalce.
  192.  *    6-may-86
  193.  *    - re-organized and wrote the update() function in display.c
  194.  *      Now my color hacks are in the right places and the code can be
  195.  *      understood.
  196.  *    [Released version 3.6f for BETA test sites]
  197.  *    8-may-86
  198.  *    - fixed bug in new display routine to wrap cursor on extended
  199.  *      lines at the right time
  200.  *    - modified the buffer-position command to give reasonable info
  201.  *    9-may-86
  202.  *    - improved the word wrap algorithm as not to discard non-space
  203.  *      delimiters. The backscan now looks for white space rather than
  204.  *      !inword().
  205.  *    [Released version 3.6g to Krannert]
  206.  *    10-may-86
  207.  *    - Added IBMPC.C an IBM-PC specific display driver. This makes paging
  208.  *      4-6 times faster. Also made some conditional changes to DISPLAY.C
  209.  *      to eliminate the pscreen[] if using the PC driver.
  210.  *    [changed version number to 3.6i]
  211.  *    12-may-86
  212.  *    - added delete-window (^X 0) command to dispose of a single window
  213.  *    - fixed problem with multiple prefixes from a command line which
  214.  *      was reported by John Gamble
  215.  *    14-may-86
  216.  *    - Added Aztec support for the IBMPC display driver. Had to
  217.  *      readjust some includes and defines for this.
  218.  *    - fixed bug in delete-window.
  219.  *    - fixed some bizarre behavior with the cursor after coming back
  220.  *      from spawn calls.
  221.  *    [changed version number to 3.7 freezing development for net release]
  222.  *    15-may-86
  223.  *    - (that didn't last long...) Added execute-macro-(1 thru 20) commands
  224.  *      to execute macro buffers (named "[Macro nn]")
  225.  *    - changed BFTEMP to BFINVS and cleaned up treatment of invisible
  226.  *      buffers.
  227.  *    16-may-86
  228.  *    - added store-macro (unbound) to store any executed command lines to
  229.  *      macro buffer.
  230.  *    - added clear-message-line (unbound) command to do just that
  231.  *    - added resize-window command to change a window's size to the
  232.  *      specified argument
  233.  *    - improved help's logic not to re-read the file if it was already
  234.  *      in a buffer
  235.  *    - added MAGIC mode to all structures and command tables, but the
  236.  *      regular expression code that John Gamble is writing is not ready.
  237.  *    18-may-86
  238.  *    - added interactive prompt requests in command line execution (i.e.
  239.  *      while executing a macro, a parameter starting with an at sign (@)
  240.  *      causes emacs to prompt with the rest of the parameter and return
  241.  *      the resulting input as the value of the parameter).
  242.  *    - added arguments to split-current-window to force the cursor into
  243.  *      the upper or lower window.
  244.  *    20-may-86
  245.  *    - added support for the Microsoft C compiler as per the changes
  246.  *      sent in by Oliver Sharp
  247.  *    - made some upgrades and fixes for VMS sent in by Guy Streeter
  248.  *    21-may-86
  249.  *    - fixed an Aztec bug in ttgetc by clearing the upper byte
  250.  *    - fixed buf in CMODE with #preprocesser input (bug fix submitted by
  251.  *      Willis of unknown path)
  252.  *    - added support of alternative startup file ( @<filename> ) in
  253.  *      the command line
  254.  *    - added ^Q quoting in interactive input (mltreply()).
  255.  *    - added re-binding of meta-prefix and ctlx-prefix
  256.  *    22-may-86
  257.  *    - reorganized getkey routines to make more sense and let prefix
  258.  *      binding work properly.
  259.  *    23-may-86
  260.  *    - checked new code on BSD4.2 and made a few fixes
  261.  *    - added optional fence matching while in CMODE
  262.  *    - added goto and search command line arguments by Mike Spitzer
  263.  *    26-may-86
  264.  *    - added parameter fetching from buffers
  265.  *    27-may-86
  266.  *    - fixed some HP150 bugs......
  267.  *    31-may-86
  268.  *    - Added Wang PC keyboard support from modifications by
  269.  *      Sid Shapiro @ Wang Institute
  270.  *    - Fixed some reverse video bugs with code submitted by Peter Chubb
  271.  *    - Fixed bug in nextbuffer reported by Dave Forslund
  272.  *    - added system V support (USG) from Linwood Varney
  273.  *    2-jun-86
  274.  *    - changed defines to just define one Unix define (for example,
  275.  *      just define BSD for Unix BSD 4.2)
  276.  *    - Added Incremental search functions written by D. R. Banks
  277.  *      in file ISEARCH.C
  278.  *    - added insert-string (unbound) command to help the macro
  279.  *      language out.
  280.  *    - added unmark-buffer (M-~) command to turn off the current buffers
  281.  *      change flag
  282.  *    - fixed nxtarg to truncate strings longer than asked for max length
  283.  *    4-jun-86
  284.  *    - added special characters in command line tokens. Tilde (~) is
  285.  *      the special lead-in character for "nrtb".
  286.  *    - Fixed bad ifdef in Aztec code so it could look at HOME dir
  287.  *      for startup, help, and emacs.rc files
  288.  *    6-jun-86
  289.  *    - make delete word commands clear the kill buffer if not after another
  290.  *      kill command
  291.  *    11-jun-86
  292.  *    - made ~@ in string arguments pass as char(192) to nxtarg() so one can
  293.  *      quote @ at the beginning of string arguments
  294.  *    - changed buffer size vars in listbuffers() to long (for big files)
  295.  *    - re-wrote buffer-position command to be much faster
  296.  *    12-jun-86
  297.  *    - added count-words (M-^C) command to count the words/chars and
  298.  *      lines in a region
  299.  *    - changed regions so they could be larger than 65535 (short ->
  300.  *      long in the REGION structure)
  301.  *    - changed ldelete() and all callers to use a long size. The kill
  302.  *      buffer will still have a problem >65535 that can not be solved
  303.  *      until I restructure it.
  304.  *    - grouped paragraph commands and word count together under symbol
  305.  *      WORDPRO to allow them to be conditionally made (or not)
  306.  *    13-jun-86
  307.  *    - re-wrote kill buffer routines again. Now they support an unlimited
  308.  *      size kill buffer, and are (in theory) faster.
  309.  *    - changed delete-next-word (M-D) to not eat the newline after a word,
  310.  *      instead it checks and eats a newline at the cursor.
  311.  *    17-jun-86
  312.  *    - added numeric argument to next/previous-window to access the nth
  313.  *      window from the top/bottom
  314.  *    - added support for the Data General 10 MSDOS machine
  315.  *    - added save-window (unbound) and restore-window (unbound) commands
  316.  *      for the use of the menu script. Save-window remembers which window
  317.  *      is current, and restore-window returns the cursor to that window.
  318.  *    20-jun-86
  319.  *    - fixed a bug with the fence matching locking up PASCAL NEAR the beginning
  320.  *      of a buffer
  321.  *    - added argument to update to selectively force a complete update
  322.  *    - added update-screen (unbound) command so macros can force a
  323.  *      screen update
  324.  *    21-jun-86
  325.  *    - rearranged token() and nxtarg() calls so that command names and
  326.  *      repeat counts could also be prompted and fetched from buffers
  327.  *      [this broke later with the exec re-write....]
  328.  *    - added write-message (unbound) command to write out a message
  329.  *      on the message line (for macros)
  330.  *    - changed ifdef's so that color modes are recognized as legal in
  331.  *      b/w version, and simply do nothing (allowing us to use the same
  332.  *      script files)
  333.  *    [Released version 3.7 on July 1 to the net and elswhere]
  334.  *    2-jul-86
  335.  *    - Changed search string terminator to always be the meta character
  336.  *      even if it is rebound.
  337.  *    3-jul-86
  338.  *    - removed extra calls to set color in startup code. This caused the
  339.  *      original current window to always be the global colors.
  340.  *    7-jul-86
  341.  *    - Fixed bugs in mltreply() to work properly with all terminators
  342.  *      including control and spec characters
  343.  *    22-jul-86
  344.  *    - fixed replaces() so that it will return FALSE properly on the
  345.  *      input of the replacement string.
  346.  *    - added a definition for FAILED as a return type.....
  347.  *    - changed version number to 3.7b
  348.  *    23-jul-86
  349.  *    - fixed o -> 0 problem in TERMIO.C
  350.  *    - made ^U universal-argument re-bindable
  351.  *    - wrote asc_int() for systems (like Aztec) where it acts strangely
  352.  *    - changed version number to 3.7c
  353.  *    25-jul-86
  354.  *    - make ^G abort-command rebindable
  355.  *    29-jul-86
  356.  *    - added HP110 Portable Computer support
  357.  *    - changed version number to 3.7d
  358.  *    30-jul-86
  359.  *    - Fixed a couple of errors in the new VMS code as pointer
  360.  *      out by Ken Shackleford
  361.  *    - split terminal open/close routines into screen and keyboard
  362.  *      open/close routines
  363.  *    - closed the keyboard during all disk I/O so that OS errors
  364.  *      can be respoded to correctly (especially on the HP150)
  365.  *    - changed version number to 3.7e
  366.  *    31-jul-86
  367.  *    - added label-function-key (unbound) command under symbol FLABEL
  368.  *      (primarily for the HP150)
  369.  *    4-aug-86
  370.  *    - added fixes for Microsoft C as suggested by ihnp4!ihuxm!gmd1
  371.  *        <<remember to fix [list] deletion bug as reported
  372.  *          by craig@hp-pcd>>
  373.  *    8-aug-86
  374.  *    - fixed beginning misspelling error everywhere
  375.  *    - fixed some more MSC errors
  376.  *    - changed version number to 3.7g
  377.  *    20-aug-86
  378.  *    - fixed CMODE .h scanning bug
  379.  *    - changed version number to 3.7h
  380.  *    30-aug-86
  381.  *    - fixed killing renamed [list] buffer (it can't) as submitted
  382.  *      by James Aldridge
  383.  *    - Added code to allow multiple lines to display during
  384.  *      vertical retrace
  385.  *      [total disaster....yanked it back out]
  386.  *    9-sep-86
  387.  *    - added M-A (apropos) command to list commands containing a substring.
  388.  *    - fixed an inefficiency in the display update code submitted
  389.  *      by William W. Carlson (wwc@pur-ee)
  390.  *    10-sep-86
  391.  *    - added Dana Hoggatt's code for encryption and spliced it into the
  392.  *      proper commands. CRYPT mode now triggers encryption.
  393.  *    - added -k flag to allow encryption key (no spaces) in command line
  394.  *    14-sep-86
  395.  *    - added missing lastflag/thisflag processing to docmd()
  396.  *    - changed version to 3.7i and froze for partial release via mail
  397.  *      and BBS
  398.  *    05-oct-86
  399.  *    - changed some strcpys in MAIN.C to bytecopys as suggested by John
  400.  *      Gamble
  401.  *    - replaces SEARCH.C and ISEARCH.C with versions modified by
  402.  *      John Gamble
  403.  *    10-oct-86
  404.  *    - removed references to lflick....it just won't work that way.
  405.  *    - removed defines LAT2 and LAT3...the code no longer is Lattice
  406.  *      version dependant.
  407.  *    14-oct-86
  408.  *    - changed spawn so that it will not not pause if executed from
  409.  *      a command line
  410.  *    15-oct-86
  411.  *    - added argument concatination (+) to the macro parsing
  412.  *    - added [] as fence pairs
  413.  *    16-oct-86
  414.  *    - rewrote all macro line parsing routines and rearranged the
  415.  *      mlreply code. Saved 6K!!! Have blazed the path for expanding
  416.  *      the command language.
  417.  *    17-oct-86
  418.  *    - added new keyboard macro routines (plus a new level to the
  419.  *      input character function)
  420.  *    22-oct-86
  421.  *    - improved EGA cursor problems
  422.  *    - added -r (restricted) switch to command line for BBS use
  423.  *    06-nov-86
  424.  *    - fixed terminator declarations from char to int in getarg() and
  425.  *      nxtarg() in EXEC.C as pointed out by John Gamble
  426.  *    07-nov-86
  427.  *    - made wordrap() user callable as wrap-word (M-FNW) and changed
  428.  *      the getckey() routine so that illegal keystrokes (too many
  429.  *      prefixes set) could be used for internal bindings. When word
  430.  *      wrap conditions are met, the keystroke M-FNW is executed. Added
  431.  *      word wrap check/call to newline().
  432.  *    11-nov-86
  433.  *    - added and checked support for Mark Williams C 86
  434.  *    12-nov-86
  435.  *    - added goto-matching-fence (M-^F) command to jump to a matching
  436.  *      fence "({[]})" or beep if there is none. This can reframe the
  437.  *      screen.
  438.  *    - added code and structure elements to support change-screen-size
  439.  *      command (M-^S) to change the number of lines being used by
  440.  *      MicroEMACS.
  441.  *    15-nov-86
  442.  *    - finished debugging change-screen-size
  443.  *    17-nov-86
  444.  *    - Incorporated in James Turner's modifications for the Atari ST
  445.  *        23-sep-86
  446.  *        - added support for the Atari ST line of computers (jmt)
  447.  *          - added a '\r' to the end of each line on output and strip
  448.  *            it on input for the SHOW function from the desktop
  449.  *          - added 3 new mode functions (HIREZ, MEDREZ, and LOREZ);
  450.  *            chgrez routine in TERM structure; and MULTREZ define in
  451.  *            ESTRUCT.H to handle multiple screen resolutions
  452.  *    [note....ST still not running under Lattice yet...]
  453.  *    25-nov-86
  454.  *    - Made the filter-buffer (^X-#) command not work on VIEW mode
  455.  *      buffers
  456.  *    - Made the quick-exit (M-Z) command throw out a newline after
  457.  *      each message so they could be seen.
  458.  *    26-nov-86
  459.  *    - fixed a couple of bugs in change-screen-size (M-^S) command
  460.  *    - changed file read behavior on long lines and last lines
  461.  *      with no newline (it no longer throws the partial line out)
  462.  *    - [as suggested by Dave Tweten] Made adding a ^Z to the end
  463.  *      of an output file under MSDOS configurable under the
  464.  *      CTRL-Z symbol in ESTRUCT.H
  465.  *    - [Dave Tweten] Spawn will look up the "TMP" environment variable
  466.  *      for use during various pipeing commands.
  467.  *    - [Dave Tweten] changed pipe command under MSDOS to use '>>'
  468.  *      instead of '>'
  469.  *    04-dec-86
  470.  *    - moved processing of '@' and '#' so that they can be outside
  471.  *      the quotes in an argument, and added hooks to process '%' for
  472.  *      environment and user variables.
  473.  *    - modified IBMPC.C to sense the graphics adapter (CGA and MONO)
  474.  *      at runtime to cut down on the number of versions.
  475.  *    05-dec-86
  476.  *    - changed macro directive character to "!" instead of "$" (see
  477.  *      below) and fixed the standard .rc file to comply.
  478.  *    - added code to interpret environment variables ($vars). Added
  479.  *      hooks for built in functions (&func). So, to recap:
  480.  *
  481.  *        @<string>    prompt and return a string from the user
  482.  *        #<buffer name>    get the next line from a buffer and advance
  483.  *        %<var>        get user variable <var>
  484.  *        $<evar>     get environment variable <evar>
  485.  *        &<func>     evaluate function <func>
  486.  *
  487.  *    - allowed repeat counts to be any of the above
  488.  *    - added code to allow insert-string (unbound) to use its
  489.  *      repeat count properly
  490.  *    - added set (^X-A) command to set variables. Only works on
  491.  *      environmental vars yet.
  492.  *    9-dec-86
  493.  *    - added some code for user defined variables...more to come
  494.  *    - added options for malloc() memory pool tracking
  495.  *    - preliminary user variables (%) working
  496.  *    - changed terminal calls to macro's (to prepare for the new
  497.  *      terminal drivers)
  498.  *    15-dec-86
  499.  *    - changed previous-line (^P) and next-line (^N) to return a
  500.  *      FALSE at the end or beginning of the file so repeated
  501.  *      macros involving them terminate properly!
  502.  *    - added code for $CURCOL and $CURLINE
  503.  *    20-dec-86
  504.  *    - set (^X-A) now works with all vars
  505.  *    - added some new functions
  506.  *        &ADD &SUB &TIMES &DIV &MOD &NEG &CAT
  507.  *    - once again rearranged functions to control macro execution. Did
  508.  *      away with getarg()
  509.  *    23-dec-86
  510.  *    - added string functions
  511.  *        &LEFt &RIGht &MID
  512.  *    31-dec-86
  513.  *    - added many logical functions
  514.  *        &NOT &EQUal &LESs &GREater
  515.  *    - added string functions
  516.  *        &SEQual &SLEss &SGReater
  517.  *    - added variable indirection with &INDirect
  518.  *    - made fixes to allow recursive macro executions
  519.  *      (improved speed during macro execution as well)
  520.  *    3-jan-87
  521.  *    - added $FLICKER to control flicker supression
  522.  *    - made spawn commands restricted
  523.  *    - cleaned up lots of unintentional int<->char problems
  524.  *    4-jan-87
  525.  *    - Fixed broken pipe-command (^X-@) command under MSDOS
  526.  *    - added !IF  !ELSE  !ENDIF  directives and changed the
  527.  *      name of !END to !ENDM....real slick stuff
  528.  *    5-jan-87
  529.  *    - quick-exit (M-Z) aborts on any filewrite errors
  530.  *    8-jan-87
  531.  *    - debugged a lot of the new directive and evaluation code.
  532.  *      BEWARE of stack space overflows! (increasing stack to
  533.  *      16K under MSDOS)
  534.  *    - removed non-standard DEC Rainbow keyboard support...let someone
  535.  *      PLEASE implement this in the standard manner using key bindings
  536.  *      and send the results to me.
  537.  *    - added change-screen-width () command and $CURWIDTH variable
  538.  *    11-jan-87
  539.  *    - fixed an incredibly deeply buried bug in vtputc and combined
  540.  *      it with vtpute (saving about 200 bytes!)
  541.  *    16-jan-87
  542.  *    - added code to handle controlling multiple screen resolutions...
  543.  *      allowed the IBM-PC driver to force Mono or CGA modes.
  544.  *    - added current buffer name and filename variables
  545.  *      $cbufname and $cfname
  546.  *    18-jan-87
  547.  *    - added $sres variable to control screen resolution
  548.  *    - added $debug variable to control macro debugging code (no longer
  549.  *      is this activated by GLOBAL spell mode)
  550.  *    - fixed bug in -g command line option
  551.  *    - Released Version 3.8 to BBSNET
  552.  *    21-jan-87
  553.  *    - added $status variable to record return status of last command
  554.  *    2-feb-87
  555.  *    - added ATARI 1040 support...runs in all three modes right now
  556.  *    - added $palette var with palette value in it
  557.  *    - undefined "register" in BIND.C and INPUT.C for ST520 & LATTICE
  558.  *      to get around a nasty Lattice bug
  559.  *    4-feb-87
  560.  *    - added, debugged code for switching all 1040ST color modes, added
  561.  *      code for HIGH monochrome mode as well, DENSE still pending
  562.  *    5-feb-87
  563.  *    - with John Gamble, found and corrected the infamous bad matching
  564.  *      fence problems.
  565.  *    - added error return check in various add/delete mode commands
  566.  *    10-feb-87
  567.  *    - re-arrange code in docmd() so that labels are stored in
  568.  *      macro buffers
  569.  *    - fixed !RETURN to only return if (execlevel == 0) [If we are
  570.  *      currently executing]
  571.  *    14-feb-87
  572.  *    - added to outp() calls in the EGA driver to fix a bug in the BIOS
  573.  *    - adding code for 1040ST 40 line DENSE mode (not complete)
  574.  *    25-feb-87
  575.  *    - added auto-save "ASAVE" mode....variables $asave and $acount
  576.  *      control the frequency of saving and count until next save
  577.  *    - added &and and &or as functions for logical anding and oring
  578.  *    - added string length &LEN, upper and lower case string funtions
  579.  *      &LOWER and &UPPER
  580.  *    27-feb-87
  581.  *    - added $lastkey   last keystroke struck and
  582.  *        $curchar    character under cursor
  583.  *    28-feb-87
  584.  *    - added code for trim-line (^X^T) command and table entries
  585.  *      for the entab-line (^X^E) and detab-line (^X^D) commands.
  586.  *      These are conditional on AEDIT (Advanced editing) in estruct.h
  587.  *    18-mar-87
  588.  *    - finished above three commands
  589.  *    - added $version environment variable to return the current
  590.  *      MicroEMACS version number
  591.  *    - added $discmd emvironment variable. This is a logical flag that
  592.  *      indicates if emacs should be echoing commands on the command line.
  593.  *      real useful in order to stop flashing macros and .rc files
  594.  *    - added $progname environment variable. this always returns the
  595.  *      string "MicroEMACS". OEM's should change this so that macros can
  596.  *      tell if they are running on an unmodified emacs or not.
  597.  *    - fixed a minor bug in the CGA/MONO detection routine in IBMPC.C
  598.  *    20-mar-87
  599.  *    - integrated EGAPC.C into IBMPC.C and eliminated the file. Now an
  600.  *      EGA user can switch from EGA to CGA modes at will
  601.  *    - A LOT of little fixes and corrections sent in by John Ruply
  602.  *    25-mar-87
  603.  *    - Fixed buffer variables so they will work when referencing the
  604.  *      current buffer
  605.  *    26-mar-87
  606.  *    - Fixed asc_int() to be more reasonable. trailing whitespace ignored,
  607.  *      only one leading sign, no non-digits allowed after the sign.
  608.  *    - fixed buffer variables to go from the point to the end of
  609.  *      line.
  610.  *    28-mar-87
  611.  *    - fixed bugs with 8 bit chars as submited by Jari Salminen
  612.  *    - replace AZTEC/MSDOS agetc() with a1getc() which won't strip
  613.  *      the high order bit
  614.  *    30-mar-87
  615.  *    - changed list-buffers (^X^B) so that with any argument, it will
  616.  *      also list the normally invisable buffers
  617.  *    - added store-procedure and execute-procedure/run (M-^E)
  618.  *      commands to store and execute named procedures.
  619.  *    31-mar-87
  620.  *    - Fixed infinite loop in ^X-X command (when [LIST] is the
  621.  *      only buffer left) as pointed out by John Maline
  622.  *    - made filenames in getfile() always lower case as pointed
  623.  *      out by John Maline
  624.  *    2-apr-87
  625.  *    - Fixed buffer variables so they would work on non-current displayed
  626.  *      buffers. They should now work with ALL buffers....
  627.  *    3-apr-87
  628.  *    - Yanked AZTEC profiling code....not very useful
  629.  *    - Modified IBMPC driver so it will not start in EGA mode
  630.  *    - allow the next-buffer (^X-X) command to have a preceding
  631.  *      non-negative argument.
  632.  *    14-apr-87
  633.  *    - added John Gamble's modified search.c. The code has cut apx
  634.  *      200-300 bytes off the executable.
  635.  *    - added the &RND function to generate a random integer between
  636.  *      1 and its arguments value. Also $SEED is availible as the
  637.  *      random number seed.
  638.  *    - changed the -k command line switch so if there is no argument,
  639.  *      it will prompt for one when the file is read
  640.  *    15-apr-87
  641.  *    - added 20 bytes of buffer in getval()'s local argument alloc so
  642.  *      when it returns a value, it has enough stack space to do at least
  643.  *      one strcpy() before stomping on the returned value. ALWAYS call
  644.  *      getval() ONLY from within a strcpy() call.
  645.  *    - made $curcol return a 1 based value instead of a zero based one.
  646.  *      [changed this back later for 3.8o   it was simply wrong.....]
  647.  *    16-apr-87
  648.  *    - re-wrote bytecopy() for AZTEC & MSDOS so it null terminates the
  649.  *      string.
  650.  *    - changed pipe() to pipecmd() to avoid conflicts with various
  651.  *      UNIX systems
  652.  *    24-apr-87
  653.  *    - changed open parameters on AMIGA window open to 0/0/640/200
  654.  *    [Froze and released v3.8i via BBS net]
  655.  *    14-may-87
  656.  *    - added nop (M-FNC) that gets called on every command loop
  657.  *    - added $wline, returns and sets # lines in current window
  658.  *    - added $cwline, returns and set current line within window
  659.  *    - added $target, returns/sets target for line moves
  660.  *    - added $search, returns/sets default search string
  661.  *    - added $replace, returns/sets default replace string
  662.  *    - added $match, returns last matched string in magic search
  663.  *    29-may-87
  664.  *    - rewrote word deletes to not kill trailing non-whitespace after
  665.  *      the last word. Also a zero argument will cause it to just delete
  666.  *      the word and nothing else.
  667.  *    - more fixes for the search pattern environment variables
  668.  *    30-may-87
  669.  *    - forced all windows to redraw on a width change
  670.  *    2-jun-87
  671.  *    - forced clear-message-line to overide $discmd
  672.  *    - added mlforce() routine and call it in clear-message-line,
  673.  *      write-message and when $debug is TRUE
  674.  *    - recoded the startup sequence in main()....Much Better...
  675.  *    4-jun-87
  676.  *    - forced interactive arguments ( @"question" ) to ALWAYS be echoed
  677.  *      regardless of the setting of $discmd.
  678.  *    7-jun-87
  679.  *    - started adding support for Turbo C under MSDOS
  680.  *    11-jun-87
  681.  *    - words now include ONLY upper/lower case alphas and digits
  682.  *    - fixed some more bugs with the startup..(ORed in the global modes)
  683.  *    - took more limits off the self-insert list....
  684.  *    16-jun-87
  685.  *    - macro debugging now displays the name of the current macro.
  686.  *    - fixed a problem in expandp() in search.c that kept high-byte
  687.  *      characters from working in search strings
  688.  *    18-jun-87
  689.  *    - added &sindex <str1> <str2> function which searches for string 2
  690.  *      within string 1
  691.  *    [released verion 3.8o internally]
  692.  *    19-jun-87
  693.  *    - added $cmode and $gmode to return and set the mode of the
  694.  *      current buffer and the global mode
  695.  *    - separated findvar() out from setvar() so it could be used in
  696.  *      the !LOOP directive (which got canned....read on)
  697.  *    - %No such variable message now types the name of the offending
  698.  *      variable
  699.  *    22-jun-87
  700.  *    - fixed startup bug when editing the startup file
  701.  *    - added the !LOOP <var> <label> directive
  702.  *    26-jun-87
  703.  *    - dumped !LOOP......added !WHILE. This needed and caused a vaste
  704.  *      reorginization in exec.c which mainly involved moving all the
  705.  *      directive handling from docmd() to dobuf(), in the process
  706.  *      getting rid of a lot of junk and making the result smaller
  707.  *      than it started.....(yea!)
  708.  *    - added $tpause to control the fence flashing time in CMODE.
  709.  *      The value is machine dependant, but you can multiply the
  710.  *      original in macros to stay machine independant. (as
  711.  *      suggested by Baron O.A. Grey)
  712.  *    - added hook to execute M-FNR (null) during a file read, after
  713.  *      the name is set and right before the file is read. Took out
  714.  *      any auto-CMODE code, as this is now handled with a macro.
  715.  *      (also suggested by Baron O.A. Grey)
  716.  *    - Added Baron O.A. Grey's SYSTEM V typeahead() code...I hope
  717.  *      this works....if you check this out, drop me a line.
  718.  *    - Added new variable $pending, returns a logical telling if
  719.  *      a typed ahead character is pending.
  720.  *    29-jun-87
  721.  *    - Made adjustmode() use curbp-> instead of curwp->w_bufp-> which
  722.  *      fixed some bugs in the startup routines.
  723.  *    - added $lwidth to return the length of the current line
  724.  *    2-jul-87
  725.  *    - Added &env <str> which returns the value of the environment
  726.  *      variable <str> where possible
  727.  *    - Fixed a NASTY bug in execbuf()..the buffer for the name
  728.  *      of the buffer to execute was NBUFN long, and got overflowed
  729.  *      with a long interactive argument.
  730.  *    3-jul-87
  731.  *    - Moved the loop to match a key against its binding out of execute()
  732.  *      to getbind() so it could be used later elsewhere.
  733.  *    - Added &bind <keyname> which returns the function bound to the
  734.  *      named key
  735.  *    - changed execute-file to look in the executable path first...
  736.  *    6-jul-87
  737.  *    - changed $curchar to return a newline at the end of a line and
  738.  *      it no longer advances the cursor
  739.  *    - a lot of minor changes sent by various people....
  740.  *    7-jul-87
  741.  *    - some amiga specific fixes as suggested by Kenn Barry
  742.  *    - added $line [read/write] that contains the current line in the
  743.  *      current buffer
  744.  *    - changed $curcol so setting it beyond the end of the line will
  745.  *      move the cursor to the end of the line and then fail.
  746.  *    10-jul-87
  747.  *    - added a number of fixes and optimizations along with the rest
  748.  *      of the TURBO-C support as submited by John Maline
  749.  *    13-jun-87
  750.  *    - caused dobuf() to copy lastflag to thisflag so the first
  751.  *      command executed will inherit the lastflag from the command
  752.  *      before the execute-buffer command. (needed this for smooth
  753.  *      scrolling to work)
  754.  *    - made flook() look first in the $HOME directory, then in the
  755.  *      current directory, then down the $PATH, and then in the
  756.  *      list in epath.h
  757.  *    14-jul-87
  758.  *    - added some fixes for VMS along with support for the SMG
  759.  *      screen package as submited by Curtis Smith
  760.  *    15-jul-87
  761.  *    - fixed M-^H (delete-previous-word) so it can delete the first
  762.  *      word in a file....I think there may be more of this kind of thing
  763.  *      to fix.
  764.  *    16-jul-87
  765.  *    - added code to allow arbitrary sized lines to be read from files..
  766.  *      speed up file reading in the process.
  767.  *    - made out of memory conditions safer.. especial on file reads
  768.  *    - fixed a bug in bind having to do with uppercasing function
  769.  *      key names (submitted by Jari Salminen)
  770.  *    - made ST520 exit in the same resolution that EMACS was started in
  771.  *      (for the 1040ST)
  772.  *    [FROZE development and released version 3.9 to USENET]
  773.  *    {It never made it.....got killed by comp.unix.sources}
  774.  *    15-sep-87
  775.  *    - added support for Mark Williams C on the Atari ST
  776.  *    - made the MALLOC debugging package only conditional on RAMSIZE
  777.  *    - added code for flagging truncated buffers
  778.  *    23-sep-87
  779.  *    - fixed &RIGHT to return the <arg2> rightmost characters
  780.  *    - fixed a buffer in getval() to be static....things are stabler
  781.  *      now.
  782.  *    - moved all the stack size declarations to after include "estruct.h"
  783.  *      they work a lot better now....... (rather than not at all)
  784.  *    - made Atari ST spawns all work with MWshell
  785.  *    - fixed spawning on the 1040ST under MWC
  786.  *    27-sep-87
  787.  *    - added &exist function to check to see if a named file exist
  788.  *    - added &find function to find a file along the PATH
  789.  *    - added -A switch to run "error.cmd" from command line
  790.  *    - added $gflags to control startup behavior....
  791.  *    03-oct-87
  792.  *    - changed ":c\" to "c:" in epath.h for the AMIGA as suggested
  793.  *      by Tom Edds
  794.  *    - added binary and, or, and xor functions as submited by John Maline
  795.  *      (&band   &bor    and    &bxor)
  796.  *    - added binary not (&bnot) function
  797.  *    - added fixes for gotoline() and nextarg() as submited by David
  798.  *      Dermott
  799.  *    - fixed return value of $curwidth as submitted by David Dermott
  800.  *    - fixed several calls to ldelete() to have a long first argument
  801.  *      (pointed out by David Dermott)
  802.  *    - Fixed a bug in stock() which prevented uppercase FN bindings as
  803.  *      pointed out by many people
  804.  *    - changed dofile() to make sure all executed files don't conflict
  805.  *      with existing buffer names. Took out cludged code in main.c to
  806.  *      handle this problem... this solution is better (suggested by
  807.  *      Don Nash)
  808.  *    05-oct-87
  809.  *    - added in John Gamble's code to allow for a replacement regular
  810.  *      expresion character in MAGIC mode
  811.  *    [note: under MSDOS  we are still TOO BIG!!!!]
  812.  *    - added overwrite-string as a new user callable function, and
  813.  *      lowrite(c) as an internal function for overwriting characters
  814.  *    - added &xlate function to translate strings according to a
  815.  *      translation table
  816.  *    10-oct-87
  817.  *    - added code to allow emacs to clean its own buffers on exit.
  818.  *      useful if emacs is used as a subprogram. Conditional on
  819.  *      the CLEAN definition in estruct.h
  820.  *    14-oct-87
  821.  *    - swallowed very hard and switched to LARGE code/LARGE data model
  822.  *    - packaged and released version 3.9c internally
  823.  *      (MSDOS executables compiled with TURBO C Large model)
  824.  *    16-oct-87
  825.  *    - temporary fix for FUNCTION keys now includes the Meta-O sequence
  826.  *      if VT100 is definined (submited by Jeff Lomicka)
  827.  *    - an VT100 also triggers input.c to force ESC to always
  828.  *      be interpeted as META as well as the currently bound key
  829.  *    - fixed a bug in the VMSVT driver as pointed out by Dave Dermott
  830.  *    - added a size parameter to token() to eliminate problems with
  831.  *      long variable names. (as sugested by Ray Wallace)
  832.  *    18-oct-87
  833.  *    - fixed a bug in the free ram code that did not clear the buffer
  834.  *      flag causing emacs to ask for more confirnmations on the way out.
  835.  *    19-oct-87
  836.  *    - added ^X-$ execute-program call to directly execute a program
  837.  *      without going through a shell... not all environments have this
  838.  *      code completed yet (uses shell-command where not)
  839.  *    [Froze for 3.9d release internally]
  840.  *    28-oct-87
  841.  *    - added code for Atari ST DENSE mode and new bell as submited
  842.  *      by J. C. Benoist
  843.  *    - made extra CR for ST files conditional on ADDCR. This is only
  844.  *      needed to make the desktop happy...and is painful for porting
  845.  *      files (with 2 CR's) elsewhere (Also from J. C. Benoist)
  846.  *    - added optional more intellegent (and larger) close brace
  847.  *      insertion code (also from J. C. Benoist)
  848.  *    4-nov-87
  849.  *    - fixed AZTEC spawning... all MSDOS spawns should work now
  850.  *    - a META key while debugging will turn $debug to false
  851.  *      and continue execution.
  852.  *    [Froze for version 3.9e USENET release]
  853.  *    13-dec-87
  854.  *    - added a change to the system V termio.c code to solve a keyboard
  855.  *      polling problem, as submited by Karl Lehenbauer
  856.  *    - removed a "static" from the mod95() function declaration
  857.  *      in crypt.c to make MSC happy (by Malcolm MacNiven)
  858.  *    - added code so the new exec routines in spawn.c are working
  859.  *      under MSC (By Malcolm MacNiven)
  860.  *    - fixed the mixed space/tab entabbing bug as suggested
  861.  *      by Michal Jaegermann
  862.  *    - added the missing brace in the VT100 code in getcmd()
  863.  *      (This one was submited by many different people)
  864.  *    - added more intelligent spawning for TURBO C as submitted
  865.  *      by Bob Montante
  866.  *    - added support for the WICAT computers running under the WMCS
  867.  *      operating system as submitted by Bruce Hunsaker
  868.  *    16-dec-87
  869.  *    - re-wrote fillpara(). Its 4 times Faster!!!
  870.  *    - moved M-FNR binding to $readfile ie to make emacs execute
  871.  *      a macro when reading files:
  872.  *        set $readhook "nop"    ;or whetever
  873.  *    19-dec-87
  874.  *    - new search algorithm from Geoff Gibbs, cleaned up by John Gamble.
  875.  *      its over 30 TIMES FASTER!!!! using a simplified Boyer and Moore
  876.  *      pattern search.  This effects all the but MAGIC search commands.
  877.  *    22-dec-87
  878.  *    - narrow-to-region (^X-<) and widen-from-region (^X->) allow you
  879.  *      to make all but a region invisable, thus all global commands
  880.  *      can act on a single region.
  881.  *    - a numeric argument on the select-buffer (^X-b) command makes
  882.  *      that buffer become "invisable"
  883.  *    - M-FNC becomes $cmdhook
  884.  *      M-FNW becomes $wraphook
  885.  *    23-dec-87
  886.  *    - made unmark-buffer (M-~) update the mode lines of all windows
  887.  *      pointing into the unmarked buffer
  888.  *    28-dec-87
  889.  *    - added new prefix MOUS (coded as MS-) for dealing with mice
  890.  *    29-dec-87
  891.  *    - vastly reorginized machine dependant code. Put termio.c and
  892.  *      spawn.c together and then pulled out msdos.c, unix.c, wmcs.c,
  893.  *      atari.c, amigados.c, and vms.c. These are the operating specific
  894.  *      source files now.
  895.  *    30-dec-87
  896.  *    - cleaned up msdos.c. Got rid of two unused spawn functions for
  897.  *      LATTICE. Also removed attempt to lookup SHELL variable to
  898.  *      find the command processer. This is definatly not applicable
  899.  *      here as COMSPEC should always be the name of the reloaded
  900.  *      command processor.
  901.  *    20-jan-87
  902.  *    - added Jeff Lomicka's ST mouse support and added some
  903.  *      appropriate code to input.c to support this.
  904.  *    - added buffer name completion to the select-buffer (^X-B)
  905.  *      command as submitted by Martin Neitzel.
  906.  *    - changed some function names:
  907.  *        abs    =>    absv
  908.  *        atoi    =>    asc_int
  909.  *        ltoi    =>    long_int
  910.  *        setmode =>    setmod
  911.  *        strncpy =>    bytecopy
  912.  *    25-jan-88    By Jeff Lomicka
  913.  *    - Added parsing of keypad keys, LK201 function key sequences, mouse
  914.  *      sequences (VaxStation form and BBN BitGraph form), and the cursor
  915.  *      position report to VMSVT.C.  This will require a change in the way
  916.  *      that VMS users bind functions to their function keys or keypad
  917.  *      keys.  This also defines a defacto-standard for the names of the
  918.  *      numeric keypad keys, based on the VT100 and compatible terminals.
  919.  *    - Added MOUSE.C to DESCRIP.MMS, and changed it to reference ME.OPT,
  920.  *      and to generate ME.EXE.
  921.  *    - Renamed MICROEMACS.OPT to ME.OPT so that the filename would fit
  922.  *      on smaller systems.
  923.  *    - Added capability for copy and paste from the terminal-wide
  924.  *      copy/paste buffer.  This allows copy and paste of the select region
  925.  *      from and to non-cooperating sessions in other windows.  (The
  926.  *      addition of the MOUSE handling routines disables the transparent
  927.  *      use of the VWS copy/paste mechanism.) There may be a bug in the
  928.  *      PASTE section of this code.  On some VWS systems, you may get a
  929.  *      bunch of Hex characters instead of text.  I'm looking in to finding
  930.  *      out what is really supported in the released versions of VWS.  This
  931.  *      code is conditional based on MOUSE & VMSVT.  Code was added to
  932.  *      VMSVT.C.  Added bindings for to ebind.h.  Yank is on ^X^Y.  Copy is
  933.  *      on ^XC.  If MOUSE & VMSVT is true, this binding overides the use of
  934.  *      ^XC for spanwcli.  [This won't stay.. alternative binding?]
  935.  *      Also added definitions for this to efunc.h.
  936.  *    - Added #define of CPM to estruct.h.  It is used in FILE.C.  You
  937.  *      might want to delete it again. [It was deleted..no CPM support]
  938.  *    - Added noshare attributes to all data in many modules.
  939.  *    - Re-introudced XONDATA condition that was in 3.9eJ's TERMIO.C into
  940.  *      VMS.C.  (This was overlooked by Dan in making 3.9g.)
  941.  *    - Appended a ":" to the "MICROEMACS$LIB:" path element in the VMS
  942.  *      portion of EPATH.H.
  943.  *    - Fixed mouse reports from VMSVT.C to correspond to the code in 3.9g.
  944.  *    - In INPUT.C, added VMS to list of systems that generate FN key and
  945.  *      mouse reports with leading 0 bytes.
  946.  *    - In order to accomodate callable editor support, I had to arrange
  947.  *      so that some of the CALLED features are active all of the time,
  948.  *      particularly EXIT HANDLING.  I changed all calls to exit() into
  949.  *      calls to meexit().  There is a great need to divide up exits
  950.  *      between error exits that aren't expected to return, and exits that
  951.  *      just set the exit flag.  Places that didn't expect exit to return
  952.  *      should be changed to return immediately after calling exit, so that
  953.  *      the command loop can catch it and return.  This error handling
  954.  *      business is a real mess right now.
  955.  *    - Re-arranged main() so that most of the guts are in called
  956.  *      routines, so that there can be more than one entry point into the
  957.  *      program.  Note, now, the possiblity of adding recursive-edit as a
  958.  *      function that you can call from a macro.
  959.  *    - Added the universal symbol ME$EDIT to the VMS version as a second
  960.  *      entry point, for use when called by MAIL and NOTES, which use
  961.  *      LIB$FIND_IMAGE_SYMBOL and perform run-time linking with their text
  962.  *      editor.  This stuff works great!
  963.  *    - Changed Atari-ST makefile to link without -VGEM, so that you will
  964.  *      get argc and argv.
  965.  *    - Fixed ST520.C so that screen would be redrawn when we notice that
  966.  *      desk accessories exit, and so that the mouse will be turned off
  967.  *      when exiting into a shell (If text cursor was on, mouse is left
  968.  *      off).
  969.  *    - Changed ST520.C to have bindings for keypad keys, with PF1 "("
  970.  *      key as metac, so that it can be used as GOLD prefix.    Uses GOLDKEY
  971.  *      option in ESTRUCT.H.
  972.  *    26-jan-88    Daniel Lawrence...
  973.  *    - cleaned up coding in main.c
  974.  *    - changed more function names
  975.  *        itoa    =>    int_asc
  976.  *        ltoa    =>    long_asc
  977.  *    27-jan-88
  978.  *    - added terminal initilizer string output to tcap.c as submitted
  979.  *      by Ge' Wiejers
  980.  *    - switched the -A command line switch to be -E the way MWC demands
  981.  *      that it be. Also had to move -E to -C (for Change...)
  982.  *    02-feb-88
  983.  *    - changed META and ^X prefixes to use a new mechinism. Hitting
  984.  *      a prefix stores it as a pending prefix.
  985.  *    05-feb-88
  986.  *    - changed emacs to use ^M for line terminators instead of
  987.  *      ^J. This required LOTS of changes. Now, however, we can
  988.  *      search for and manipulate ^M.
  989.  *    - fixed getcmd() to work again so that describe-key and
  990.  *      interactive binding functions work again.
  991.  *    - added $sterm environmental variable. This hold the current
  992.  *      value of the keystroke needed to terminate search string
  993.  *      requests. The value in here is also automatically reset
  994.  *      any time the meta-prefix is rebound, the the meta-prefix's value
  995.  *    06-feb-88
  996.  *    - fixed bug in stock().. real control characters in command lines
  997.  *      now bind properly
  998.  *    [BBS release of version 3.9i]
  999.  *    23-feb-88
  1000.  *    - added buffer name completion to delete-buffer (^XK) and reorginized
  1001.  *      code their to gain back 1 K
  1002.  *    - added $modeflag to allow us to hide the modelines.
  1003.  *    - added $sscroll to allow smooth scrolling... (I don't like this
  1004.  *      but there were too many requests for it).
  1005.  *    - added $lastmesg to hold last message EMACS wrote out
  1006.  *    04-mar-88
  1007.  *    - added Alan Phillip's mods to support the VGA adapter on the
  1008.  *      IBM PS/2 machines. Modified it a little.
  1009.  *    15-mar-88
  1010.  *    - Forever twiddling with the startup code, I moved the initialization
  1011.  *      of exitflag to main() to allow a startup file to exit EMACS
  1012.  *      properly.  Also had to make meexit always return(TRUE) regardless
  1013.  *      of the exitstatus. (Ie it always works and doesn't abort the macro)
  1014.  *    17-mar-88
  1015.  *    - added code to change hard tab size with $tabsize variable
  1016.  *    - added binary search to fncmatch()
  1017.  *    28-mar-88
  1018.  *    - optimized the IBMPC version in TURBO C by supplying mixed memory
  1019.  *      mode information (NEAR and PASCAL). The executable is down to
  1020.  *      89K..but remember to name the code segment (from the options menu)
  1021.  *    1-apr-88
  1022.  *    - added remove-mark (^X<space>) to allow you to unset the mark
  1023.  *      in the current window.
  1024.  *    8-apr-88
  1025.  *    - Lots of twiddling with the mixed memory model TURBOC IBM-PC
  1026.  *      version... its 87K long now and fairly stable
  1027.  *    - changed behavior of CMODE when inserting blank lines
  1028.  *    - tightened stack usage from 32K to 20K
  1029.  *    9-apr-88
  1030.  *    - added new cinsert(). blank lines no longer confuse the CMODE
  1031.  *      indentation. Trailing white space is deleted when newline is
  1032.  *      hit in CMODE.
  1033.  *    12-apr-88
  1034.  *    - fixed long standing bug in query-replace-string. When the line the
  1035.  *      point originally starts on is extended (thus re-malloced) a '.',
  1036.  *      aborting the replace and returning to the original replace had
  1037.  *      locked things up. no more.
  1038.  *    07-may-88
  1039.  *    - fixed bug in narrow() ... it works everywhere now.
  1040.  *    [BBS release of 3.9n]
  1041.  *    3-june-88
  1042.  *    - removed restriction against deleting invisable buffers
  1043.  *    - a lot of little fixes suggested by Dave Tweten
  1044.  *    10-jun-88
  1045.  *    - added "safe save"ing as coded by Suresh Konda.
  1046.  *      (when writing a file to disk, it writes it to a temporary file,
  1047.  *       deletes the original and renames the temp file)
  1048.  *    - added $ssave flag to enable or disable safe file saving
  1049.  *    12-jun-88
  1050.  *    - added automatic horizontal window scrolling.    $hscroll (default
  1051.  *      is TRUE) controls if it is enabled. $fcol is the current first
  1052.  *      column of window in screen column one.  $hjump determines the
  1053.  *      number of columns scrolled at a time.
  1054.  *    - changed version number to 3.9o
  1055.  *    22-jun-88
  1056.  *    - made binary searches start from 0 instead of one... EMACS can
  1057.  *      find the first of many lists again.
  1058.  *    - more debugging things.  Added the dump-variable command which
  1059.  *      creates a buffer (like list-buffers does) with all the environment
  1060.  *      and user variables and their values.    Also the display (^XG)
  1061.  *      command prompts and lists the value of a variable.  These are
  1062.  *      both conditional on the DEBUGM symbol in estruct.h
  1063.  *    1-jul-88
  1064.  *    - fixed a bug in showcpos() which did not report the proper value
  1065.  *      for the current character when issued at the end of the file
  1066.  *    [Released internally as 3.9p]
  1067.  *    3-aug-88
  1068.  *    - changed keyname in stock() in bind.c to unsigned char for
  1069.  *      compilers that don't default. This allows more arbitrary
  1070.  *      rebinding. (submitor: David Sears)
  1071.  *    12-aug-88
  1072.  *    - changed wrap-word to force $fcol to 0
  1073.  *    - changed fill-paragraph (M-Q) to force $fcol to 0
  1074.  *    - added -i command line switch to initialize a variable's value
  1075.  *      for example:    emacs -i$sres VGA
  1076.  *    26-aug-88
  1077.  *    - changed code in updateline() in display.c to remove reliance
  1078.  *      on well behaved pointer subtraction (submitted by Kenneth Sloan)
  1079.  *    - fixed potential bug in fileio.c in ffgetline()
  1080.  *      (submitted by John Owens)
  1081.  *    6-sep-88
  1082.  *    - &right and &mid now check their arguments so the bytecopy can not
  1083.  *      start past the end of the string.
  1084.  *    - added $writehook to execute macroes when writing files
  1085.  *    - added $exbhook to execute macro when exiting an old buffer
  1086.  *    - added $bufhook to execute macro when entering a new buffer
  1087.  *    14-sep-88
  1088.  *    - asc_int() now ignores trailing non-digits
  1089.  *    15-sep-88
  1090.  *    - added &trim function to trim whitespace off a variable
  1091.  *    - changed message "Out of memory while inserting string" to
  1092.  *      "Can not insert string" as this error can result when the
  1093.  *      current buffer is in VIEW mode as well.
  1094.  *    - made trim-line, entab-line, and detab-line work on the
  1095.  *      current region if they have no arguments.  Also added alias
  1096.  *      trim-region, entab-region and detab-region.  The old names
  1097.  *      will hang about for a version, then dissapear.  I like the
  1098.  *      new functionality much better.
  1099.  *    25-sep-88
  1100.  *    - Inserted the macros isletter(), isuppper(), islower(), and
  1101.  *      CHCASE() whereever appropriate, replacing explicit character
  1102.  *      comparisons.    When DIACRIT is set to one, they become functions
  1103.  *      and know about the extended ascii character set.  Functions right
  1104.  *      now are in for MSDOS.C - other machines to follow.  From J. Gamble.
  1105.  *    26-sep-88
  1106.  *    - moved all text constants out to a language specific header file
  1107.  *      and left an english version of the constant in a remark at its
  1108.  *      occurence.
  1109.  *    - added $language to return the language of the current version
  1110.  *    - added elang.h to call the proper language specific module
  1111.  *    2-oct-88
  1112.  *    - removed DIACRIT conditional. Its there all the time now. Ripped
  1113.  *      the old code, and replaced it with a upcase[] and lowcase[]
  1114.  *      table.  Functions to manipulate it are now in new source file
  1115.  *      char.c and can be made conditional on system and language.
  1116.  *      Added table for extended MSDOS modeled after John Gamble's
  1117.  *      code.
  1118.  *    5-oct-88
  1119.  *    - got rid of CHCASE()..[except in the MAGIC mode search code]
  1120.  *      I ALWAYS force to upper or lower, and never simply swap.  They
  1121.  *      are now uppercase() and lowercase() in the new char.c source file.
  1122.  *    7-oct-88
  1123.  *    - added all the needed code to use TERMCAP on UNIX to interpret
  1124.  *      function and cursor keys.  A rather slimy trick involving
  1125.  *      the key timing is used, and this makes keyboard macroes
  1126.  *      a little dicy....
  1127.  *    - added the DIACRIT compilation flag back for people who
  1128.  *      want more speed in MAGIC mode.
  1129.  *    10-oct-88
  1130.  *    - as suggested by Michael Andrews, when the current buffer is
  1131.  *      in view mode, don't preallocate expansion room in new lines.
  1132.  *      (ie we aren't editing them anyway!)
  1133.  *    - added Microsoft Mouse drive... went very well. It all appears
  1134.  *      to work, just like the Atari ST mouse driver.
  1135.  *    11-oct-88
  1136.  *    - recieved and tested german.h header file from Martin Neitzel
  1137.  *      (unido!sigserv!neitzel@uunet.uu.net)
  1138.  *    15-oct-88
  1139.  *    - recieved and tested dutch.h header file from Paul De Bra
  1140.  *      (debra@research.att.com)
  1141.  *    - fixed a lot of mouse movement problems.  Dragging a mode line
  1142.  *      sideways horizontally scrolls a it's window.  Fixed positioning
  1143.  *      problems with scrolled and extended lines.
  1144.  *    - added $msflag to turn the mouse off
  1145.  *    - added $diagflag.  When set to FALSE, no diagonal movement is
  1146.  *      possible.  Vertical movement has precidence, but an explicit
  1147.  *      horizontal drag still works.
  1148.  *    - grabbing and dragging the last char of the command line allows
  1149.  *      you to resize the editing screen.  This should be tied into
  1150.  *      various windowing systems later.
  1151.  *    - write mouse-region-(down/up). See the emacs reference docs on the
  1152.  *      exact behavior of these.
  1153.  *    - deleted the old mouse-(kill/yank)-(up/down). They are
  1154.  *      redundant now, and don't work as well as mouse-region-*.
  1155.  *    2-nov-88    [changes submitted by Allen Pratt from ATARI]
  1156.  *    - created DIRSEPSTR and DIRSEPCHAR definitions for directory seperators
  1157.  *    - added TTflush in bindtokey() to force space out to terminal after
  1158.  *      binding name.
  1159.  *    - fixed a pointer casting problem in display.c involving pointer subtraction
  1160.  *    - removed the cursormove() from the beginning of mlwrite() so
  1161.  *      the cursor need not jump to the command line if the fisplay
  1162.  *      is disabled by setting $discmd to FALSE.
  1163.  *    - added >c to get a emacs command sequence and return it as
  1164.  *      a bindable string
  1165.  *    - changed scrnextup -> nextup, scrnextdn -> nextdown, and
  1166.  *      mlreplyt -> mltreply to make short symbol compilers happy.
  1167.  *    - added "print" as a synonim to "write-message".
  1168.  *    - added "source" as a synonim to "execute-file".
  1169.  *    - added a M-^X binding to the execute-command-line command
  1170.  *    4-nov-88
  1171.  *    - changed $tabsize to $hardtab. Added $softab as the current
  1172.  *      softtab size (previously only changable by the ^I (handle-tab)
  1173.  *      command.
  1174.  *    - fixed various problems in reglines() and made ^X^D (detab-region)
  1175.  *      and ^X^E (entab-region) use the current hard tab setting.
  1176.  *    - execute-command-line (M-^X) when executed within a macro line
  1177.  *      (which sounds redundent) will force all of the arguments of
  1178.  *      the executed command to be taken interactivly.  I needed this
  1179.  *      for the new macro to allow mouse functionality on the
  1180.  *      function key window.
  1181.  *    - taking Michael Andrew's suggestion to its conclusion, we no longer
  1182.  *      allocate any extra space except when inserting.  This has
  1183.  *      substantially decreased the memory usage.  Note that when
  1184.  *      we must explicitly set l_used to the proper amount since lalloc()
  1185.  *      is not responcible for the rounding up.
  1186.  *    - arranged to allow getstring() to return a NULL result.  Aborting
  1187.  *      out of an interactive prompt now will properly terminate a macro.
  1188.  *    [Released the 3.10 BETA test version...yes the ATARI version is broke]
  1189.  *    24-nov-88
  1190.  *    - fixed system V input char HOG problems as submitted by
  1191.  *      Kjartan R. Gudmundsson. Also eliminated some other 7 bit filters
  1192.  *      in unix.c at the same time.
  1193.  *    - reading function keys into table has been fixed in TCAP.C.  It will
  1194.  *      no longer attempt to strcpy NULL pointers.
  1195.  *    1-dec-88
  1196.  *    - multiple marks are now implemented. (What a task...). Set-mark
  1197.  *      (M-<space>), remove-mark (^X<space>) and exchange-point-and-mark
  1198.  *      (^X^X) all take a numeric argument from 0 to NMARKS-1 (9 now).
  1199.  *    2-dec-88
  1200.  *    - added goto-mark (M-^G) which moves the point to the requested mark.
  1201.  *    - fixed some VMS things that Curtis pointed out...
  1202.  *    - fixed bug in crypt() algorith!!!! This works properly now.  I had
  1203.  *      to add a $oldcrypt environment variable to trigger the broken
  1204.  *      behavior so people could decrypt their old files.  I will probably
  1205.  *      have to live with this.....
  1206.  *    15-dec-88
  1207.  *    - added end-of-word command to advance just past the end of a word.
  1208.  *    20-dec-88
  1209.  *    - added definitions for SUN's OS and SCO XENIX to allow us to use
  1210.  *      specific calls in those OSs for waiting and timing.
  1211.  *    - merged in XTCAP.C as submitted by Guy Turcotte into tcap.c.  This
  1212.  *      mirrors the BSD 4.3 changes for function keys for the SCO XENIX
  1213.  *      and SUN OS versions
  1214.  *    14-jan-89
  1215.  *    - added $region as a read only variable (max 128 chars) of the
  1216.  *      current region (as suggested by Allan Pratt)
  1217.  *    - changed KEYTAB structure to allow us to bind user macroes
  1218.  *      (buffers) to keys as well as C functions. Lots of changes
  1219.  *      for this.
  1220.  *    18-jan-89
  1221.  *    - finished changes for the new KEYTAB structure.
  1222.  *    - modified describe-bindings to display the bound macroes.
  1223.  *    - added arguments to nullproc() in main.c (BUG FIX!)
  1224.  *    - tried (and succeeded) in defining the pascal keyword
  1225.  *      for MSDOS & TURBO. A 2k reduction in the executable was nice.
  1226.  *    - added macro-to-key (^X^K) function to bind a macro to a key.
  1227.  *    19-jan-89
  1228.  *    - made numeric arguments to keys bound to macroes repeat those
  1229.  *      macroes n times.
  1230.  *    - modified docmd() to look for a macro name if it could not find
  1231.  *      a function name. Again a numeric leadin implies repitition.
  1232.  *    - added machine code execpr() function to the IBMPC version
  1233.  *      because under NOVELL Netware, the DOS 4B exec call does not
  1234.  *      preserve the stack on exit... thus execprog() would die.  This
  1235.  *      requires that you add execpr.obj to the make and link files!
  1236.  *      There is a symbol (NOVELL) in estruct.h to control this code
  1237.  *      being included.
  1238.  *    24-jan-89
  1239.  *    - various bug fixes and type fixes as suggested by the high C
  1240.  *      compiler on the IBM-RT
  1241.  *    1-feb-89
  1242.  *    - changed the fgetc() in unix.c to a read() under V7 and BSD so
  1243.  *      the time dependant function key checking works.
  1244.  *    - added a support for Hewlet Packard's UNIX system which
  1245.  *      is a System V with BSD 4.3 enhancements.  This is controled
  1246.  *      by the HPUX symbol in estruct.h.
  1247.  *    5-feb-89
  1248.  *    - modified mouse-region-up so right clicking down on a modeline and
  1249.  *      then releasing closes that window
  1250.  *    12-feb-89
  1251.  *    - Goaded onward by file completion code submitted by Fuyau Lin, all
  1252.  *      the completion code has been re-written and layered properly.
  1253.  *      Any OS specific driver need to now supply getffile() and
  1254.  *      getnfile() to supply a completion file list, or these can
  1255.  *      return NULL on systems where this is not possible. All this code
  1256.  *      is conditional on the COMPLET symbol in estruct.h.
  1257.  *    17-mar-89
  1258.  *    - system V code from April 1989 "C Users Journal" installed in
  1259.  *      UNIX.C. Hope this puts that problem to rest.
  1260.  *    - Jeff Lomicka fixed a lot of mousing bugs in ST520.c
  1261.  *    - Re-wrote AMIGADOS.C.  This should work properly with INTUITION
  1262.  *      and lots of windowing (resizing, mousing, etc.)
  1263.  *    - more additions for the DATA GENERAL from Doug Rady. (read
  1264.  *      the history in aosvs.c for details).
  1265.  *    - orginized the NOSHARE, VIOD and CONST keywords better.
  1266.  *    - A lot of general cleanup.
  1267.  *    [Released as version 3.10 to the world]
  1268.  */
  1269.  
  1270. history()
  1271.  
  1272. {
  1273.     /* this is here to keep compilers from complaining... it's not needed */
  1274. }
  1275.